﻿/*======================================
    Products Page Styles
========================================*/

/* Product Card Styles */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    border: 1px solid #f0f0f0;
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        border-color: #e0e0e0;
    }

.product-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* Product Code Badge */
.product-code {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Category Badge on Image */
.product-category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 102, 204, 0.9);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* Product Content */
.product-content {
    padding: 18px 20px 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    .product-title a {
        color: #1a1a1a;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .product-title a:hover {
            color: #0066cc;
        }

.product-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-category {
    display: inline-block;
    font-size: 12px;
    color: #0066cc;
    background: #e8f0fe;
    padding: 2px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
    margin-top: 4px;
}

    .product-footer .main-btn {
        padding: 6px 20px;
        font-size: 13px;
        border-radius: 6px;
        background: #0066cc;
        color: #fff;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .product-footer .main-btn:hover {
            background: #004d99;
            transform: translateX(-4px);
        }

        .product-footer .main-btn i {
            margin-right: 6px;
        }

/*======================================
    Product Details Page
========================================*/

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 30px;
}

.main-image {
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
}

    .main-image img {
        width: 100%;
        height: 450px;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

        .main-image img:hover {
            transform: scale(1.02);
        }

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 0 0 calc(25% - 10px);
}

    .thumbnail-item:hover {
        border-color: #0066cc;
    }

    .thumbnail-item img,
    .thumbnail-item video {
        width: 100%;
        height: 80px;
        object-fit: cover;
        display: block;
    }

/* Product Info */
.product-info {
    padding: 10px 0;
}

    .product-info .product-title {
        font-size: 28px;
        font-weight: 800;
        color: #1a1a1a;
        margin-bottom: 15px;
        height: auto;
        line-height: 1.3;
    }

.product-code {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

    .product-code span {
        font-weight: 500;
        color: #333;
    }

    .product-code strong {
        color: #0066cc;
        font-weight: 600;
    }

.product-category-info {
    margin-bottom: 15px;
}

    .product-category-info span {
        font-weight: 500;
        color: #333;
    }

    .product-category-info a {
        color: #0066cc;
        text-decoration: none;
        font-weight: 500;
    }

        .product-category-info a:hover {
            text-decoration: underline;
        }

.product-abstract {
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 15px 0;
}

    .product-abstract p {
        font-size: 15px;
        color: #555;
        line-height: 1.8;
    }

.product-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

    .product-actions .main-btn {
        padding: 12px 30px;
        font-size: 15px;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

        .product-actions .main-btn.btn-primary {
            background: #0066cc;
            color: #fff;
        }

            .product-actions .main-btn.btn-primary:hover {
                background: #004d99;
                transform: translateY(-2px);
                box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
            }

        .product-actions .main-btn.btn-outline {
            background: transparent;
            color: #0066cc;
            border: 2px solid #0066cc;
        }

            .product-actions .main-btn.btn-outline:hover {
                background: #0066cc;
                color: #fff;
                transform: translateY(-2px);
            }

.product-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

    .product-share span {
        font-weight: 500;
        color: #333;
    }

    .product-share a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #f0f0f0;
        color: #555;
        transition: all 0.3s ease;
        text-decoration: none;
        font-size: 16px;
    }

        .product-share a:hover {
            background: #0066cc;
            color: #fff;
            transform: translateY(-2px);
        }

/* Product Description */
.product-description {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

    .product-description h3 {
        font-size: 22px;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 20px;
        position: relative;
        padding-bottom: 12px;
    }

        .product-description h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 50px;
            height: 3px;
            background: #0066cc;
            border-radius: 2px;
        }

.description-content {
    font-size: 15px;
    color: #444;
    line-height: 2;
}

    .description-content p {
        margin-bottom: 15px;
    }

    .description-content ul,
    .description-content ol {
        padding-right: 20px;
        margin-bottom: 15px;
    }

    .description-content li {
        margin-bottom: 8px;
    }

/* Related Products */
.related-products {
    padding: 40px 0 20px;
}

    .related-products .section-title {
        font-size: 26px;
        font-weight: 700;
        color: #1a1a1a;
        position: relative;
        padding-bottom: 15px;
    }

        .related-products .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: #0066cc;
            border-radius: 2px;
        }

    .related-products .product-card {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #f0f0f0;
    }

        .related-products .product-card:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        }

    .related-products .product-image {
        height: 180px;
    }

    .related-products .product-title {
        font-size: 14px;
        height: 38px;
    }

    .related-products .product-content {
        padding: 14px 16px 16px;
    }

    .related-products .main-btn {
        padding: 4px 16px;
        font-size: 12px;
    }

/*======================================
    Slick Slider Custom Styles
========================================*/

.product-slider {
    position: relative;
    padding: 0 30px;
}

    .product-slider .slick-slide {
        padding: 0 12px;
    }

    .product-slider .slick-prev,
    .product-slider .slick-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #ffffff;
        border: 2px solid #e0e0e0;
        color: #333;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

        .product-slider .slick-prev:hover,
        .product-slider .slick-next:hover {
            background: #0066cc;
            color: #fff;
            border-color: #0066cc;
            box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
        }

    .product-slider .slick-prev {
        right: -20px;
    }

    .product-slider .slick-next {
        left: -20px;
    }

    .product-slider .slick-dots {
        bottom: -40px;
    }

        .product-slider .slick-dots li button::before {
            font-size: 12px;
            color: #ccc;
        }

        .product-slider .slick-dots li.slick-active button::before {
            color: #0066cc;
        }

/*======================================
    Responsive Styles
========================================*/

@media (max-width: 991px) {
    .product-image {
        height: 180px;
    }

    .product-info .product-title {
        font-size: 24px;
    }

    .main-image img {
        height: 350px;
    }

    .product-slider .slick-prev {
        right: -10px;
    }

    .product-slider .slick-next {
        left: -10px;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 200px;
    }

    .product-info .product-title {
        font-size: 20px;
    }

    .main-image img {
        height: 280px;
    }

    .product-slider {
        padding: 0 15px;
    }

        .product-slider .slick-prev {
            right: -5px;
            width: 32px;
            height: 32px;
            font-size: 14px;
        }

        .product-slider .slick-next {
            left: -5px;
            width: 32px;
            height: 32px;
            font-size: 14px;
        }

    .product-actions {
        flex-direction: column;
    }

        .product-actions .main-btn {
            width: 100%;
            justify-content: center;
        }

    .product-description {
        padding: 20px;
    }

    .thumbnail-item {
        flex: 0 0 calc(33.33% - 10px);
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 160px;
    }

    .product-content {
        padding: 14px 16px 16px;
    }

    .product-title {
        font-size: 14px;
        height: 38px;
    }

    .product-excerpt {
        font-size: 12px;
        height: 36px;
    }

    .main-image img {
        height: 220px;
    }

    .product-info .product-title {
        font-size: 18px;
    }

    .product-slider .slick-prev,
    .product-slider .slick-next {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .thumbnail-item {
        flex: 0 0 calc(50% - 10px);
    }
}
/* ===== Gallery Styles ===== */
.product-gallery {
    position: sticky;
    top: 30px;
}

.main-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
}

.main-image {
    position: relative;
    overflow: hidden;
}

    .main-image img {
        width: 100%;
        height: 450px;
        object-fit: contain;
        transition: transform 0.3s ease;
        display: block;
    }

        .main-image img:hover {
            transform: scale(1.05);
        }

.zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    backdrop-filter: blur(4px);
}

    .zoom-icon:hover {
        background: #0066cc;
        transform: scale(1.1);
    }

/* Thumbnails */
.thumbnail-wrapper {
    position: relative;
}

.thumbnail-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

    .thumbnail-slider::-webkit-scrollbar {
        height: 4px;
    }

    .thumbnail-slider::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .thumbnail-slider::-webkit-scrollbar-thumb {
        background: #0066cc;
        border-radius: 10px;
    }

.thumbnail-item {
    flex: 0 0 100px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

    .thumbnail-item:hover {
        border-color: #0066cc;
        transform: scale(1.05);
    }

    .thumbnail-item.active {
        border-color: #0066cc;
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.3);
    }

    .thumbnail-item img,
    .thumbnail-item video {
        width: 100%;
        height: 70px;
        object-fit: cover;
        display: block;
    }

.video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
}

/* Image Counter */
.image-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

/* ===== Zoom Modal ===== */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: zoomFadeIn 0.3s ease;
}

    .zoom-modal.active {
        display: flex;
    }

@keyframes zoomFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .zoom-modal-content img {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    }

.zoom-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s ease;
    line-height: 1;
}

    .zoom-close:hover {
        transform: rotate(90deg);
    }

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.zoom-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .zoom-btn:hover {
        background: #0066cc;
        border-color: #0066cc;
        transform: scale(1.1);
    }

#zoomCounter {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .main-image img {
        height: 350px;
    }

    .thumbnail-item {
        flex: 0 0 80px;
    }

        .thumbnail-item img,
        .thumbnail-item video {
            height: 60px;
        }
}

@media (max-width: 768px) {
    .main-image img {
        height: 280px;
    }

    .thumbnail-item {
        flex: 0 0 70px;
    }

        .thumbnail-item img,
        .thumbnail-item video {
            height: 55px;
        }

    .zoom-modal-content {
        max-width: 95%;
    }

    .zoom-close {
        top: -40px;
        font-size: 30px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-image img {
        height: 220px;
    }

    .thumbnail-item {
        flex: 0 0 60px;
    }

        .thumbnail-item img,
        .thumbnail-item video {
            height: 45px;
        }

    .zoom-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        bottom: 10px;
        right: 10px;
    }
}

